package com.gzs.learn.springcloud.service;

import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

public class MockItoExample {

    @Test
    public void testMockBase(){
        ICacheService mockCache = Mockito.mock(ICacheService.class);
        Mockito.when(mockCache.getConfig("foo","bar")).thenReturn("foobar");
        String config = mockCache.getConfig("foo", "bar");
        System.out.println(config);
    }
}
